﻿@model Vcare.ViewModels.ViewModelMembershipCards

<h2>Purchase Of Membership Cards</h2>
<div class="spacer">
</div>
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Membership Cards</legend>
        @Html.HiddenFor(model => model.PurchasedMember.DateCreated)

        <div class="editor-label">
            @Html.LabelFor(model => model.NumberOfCards)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.NumberOfCards)
            @Html.ValidationMessageFor(model => model.NumberOfCards)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PurchasedMember.Price)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PurchasedMember.Price)
            @Html.ValidationMessageFor(model => model.PurchasedMember.Price)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PurchasedMember.SoldOnPrice)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PurchasedMember.SoldOnPrice)
            @Html.ValidationMessageFor(model => model.PurchasedMember.SoldOnPrice)
        </div>


        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("List", "ListOfPurchasedMembers", null, new { style="font-size: 16px;" }) | 
    @Html.ActionLink("Allocate", "Allocate", null, new { style="font-size: 16px;" })
</div>
<div class="spacer"></div>
<div class="spacer"></div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

<script type="text/javascript">
    $(document).ready(function () {

        $('#PurchasedMember_DateCreated').val('@(DateTime.Now)');

    });
</script>

